Backend System Design Template
Framework Overview

The framework follows a structured approach with two primary goals:
- First Priority: Satisfy Functional Requirements (deliver a working system)
- Second Priority: Satisfy Non-Functional Requirements (optimize and scale)
Flow: Requirements → Core Entities → API Interface → [Data Flow] → High-Level Design → Deep Dives
Note: Data Flow (step 4) is optional and only needed for data processing systems
Table of Contents
- Requirements (~5 minutes)
- Core Entities (~2 minutes)
- API or System Interface (~5 minutes)
- Data Flow (~5 minutes) [Optional]
- High Level Design (~10-15 minutes)
- Deep Dives (~10 minutes)
- Backend system design problems
Requirements (~5 minutes)
1) Functional Requirements
"Users/Clients should be able to..." statements - core features of your system
Key Questions to Ask:
- Does the system need to do X?
- What would happen if Y?
- What are the top 3 most important features?
Example Requirements:
- Users should be able to [action]
- Users should be able to [action]
- Users should be able to [action]
💡 Tip: Keep requirements targeted! Focus on top 3 features to avoid scope creep.
2) Non-functional Requirements
"The system should be..." statements about system qualities
Checklist to Consider:
- CAP Theorem: Consistency vs Availability preference?
- Environment Constraints: Mobile/battery/memory limitations?
- Scalability: Read vs write ratio? Bursty traffic patterns?
- Latency: Response time requirements (e.g., < 200ms)?
- Durability: Data loss tolerance?
- Security: Data protection and access control needs?
- Fault Tolerance: Failure handling requirements?
- Compliance: Legal/regulatory requirements?
Example Requirements:
- The system should prioritize [availability/consistency]
- The system should scale to support [X] users
- The system should have [feature] latency < [X]ms
- The system should [durability/security requirement]
3) Capacity Estimation
Only perform calculations if they directly influence your design
When to Calculate:
- Storage requirements affect partitioning strategy
- Traffic patterns influence caching decisions
- Data size impacts architectural choices
Common Calculations:
- Daily Active Users (DAU):
- Queries Per Second (QPS):
- Storage Requirements:
- Bandwidth:
Core Entities (~2 minutes)
List the core entities that your API will exchange and system will persist
Questions to Help Identify Entities:
- What are the main "things" in this system?
- What data needs to be stored and retrieved?
- What objects do users interact with?
Example Entities:
- Entity1: Brief description
- Entity2: Brief description
- Entity3: Brief description
💡 Tip: Choose good names! Start simple and evolve as you design.
API or System Interface (~5 minutes)
Define the contract between your system and its users
Protocol Choice
- REST (Default): HTTP verbs for CRUD operations
- GraphQL: When clients have diverse data needs
- RPC/gRPC: For internal APIs requiring high performance
API Endpoints
Authentication:
- Always derive user context from auth token, not request body
Example REST Endpoints:
POST /v1/[resource]
body: {
"field": "value"
}
GET /v1/[resource]/{id} -> [Entity]
POST /v1/[resource]/{id}/[action]
GET /v1/[resource]?param=value -> [Entity][]
Real-time Features:
- WebSockets for bidirectional communication
- Server-Sent Events for server-to-client streaming
Data Flow (~5 minutes) [Optional]
High-level sequence of actions for data processing systems
When to Include:
- Data processing systems
- Systems with complex workflows
- ETL/batch processing systems
Example Flow:
- Step 1: Action/Process
- Step 2: Action/Process
- Step 3: Action/Process
- Step 4: Action/Process
- Step 5: Action/Process
High Level Design (~10-15 minutes)
Draw boxes and arrows representing system components and interactions
Design Approach
- Go endpoint by endpoint - build up design sequentially
- Focus on functional requirements first
- Note complexity areas for later deep dives
- Talk through data flow from request to response
Key Components
- Load Balancer: Traffic distribution
- Application Servers: Business logic
- Databases: Data persistence
- Caches: Performance optimization
- Message Queues: Async processing
- CDN: Static content delivery
Data Models
Document relevant columns/fields next to database components
[Entity1] Table:
- id: Primary key
[Entity2] Table:
- id: Primary key
💡 Tip: Only document fields relevant to your design, not obvious ones like name/email.
Architecture Diagram
[Client] -> [Load Balancer] -> [App Servers] -> [Database]
-> [Cache]
-> [Message Queue]
Deep Dives (~10 minutes)
Iterate on design to meet non-functional requirements and address bottlenecks
Areas to Address
- Non-functional Requirements: Ensure all requirements are met
- Edge Cases: Handle unusual scenarios
- Bottlenecks: Identify and resolve performance issues
- Scalability: Horizontal scaling, sharding, caching
- Reliability: Fault tolerance, redundancy
- Security: Authentication, authorization, data protection
Common Deep Dive Topics
Caching Strategy:
- Cache levels (CDN, app-level, database)
- Cache invalidation policies
- Cache warming strategies
Database Scaling:
- Read replicas for read-heavy workloads
- Sharding strategies for write-heavy workloads
- Database partitioning approaches
Performance Optimization:
- Indexing strategies
- Query optimization
- Connection pooling
Monitoring & Observability:
- Logging strategy
- Metrics and alerting
- Distributed tracing
Security Considerations:
- Authentication mechanisms
- Rate limiting
- Input validation
- Data encryption
Seniority Considerations
- Junior: Let interviewer guide deep dives
- Senior: Proactively identify areas for improvement
- Staff+: Lead comprehensive architectural discussions
💡 Tip: Balance being proactive with giving interviewer space to ask questions.
Interview Success Tips
- Time Management: Stick to recommended time allocations, use a timer if needed
- Stay Focused: Resist urge to over-engineer early; build working system first
- Communicate Clearly: Think out loud, explain trade-offs, ask clarifying questions
- Be Iterative: Start with simple design, then enhance based on requirements
- Practice Tools: Get familiar with whiteboarding software (Excalidraw, Lucidchart)
- Listen Actively: Give interviewer space to guide discussion and ask questions
- Handle Ambiguity: Ask targeted questions to clarify requirements early
- Show Trade-off Thinking: Discuss pros/cons of different approaches
- Prepare Common Patterns: Know standard solutions for caching, scaling, etc.
- Practice Drawing: Be able to quickly sketch clean, understandable diagrams
Common Pitfalls to Avoid:
❌ Don't: Dive into deep technical details too early ✅ Do: Build complete system first, then optimize
❌ Don't: Assume requirements without asking ✅ Do: Clarify ambiguous requirements upfront
❌ Don't: Design for maximum scale immediately ✅ Do: Start simple and scale based on actual requirements
❌ Don't: Ignore the interviewer and monologue ✅ Do: Collaborate and respond to interviewer cues
❌ Don't: Focus only on happy path scenarios ✅ Do: Consider edge cases and failure modes
Final Framework Reminder:
Primary Goal: Deliver a working system that satisfies functional requirements Secondary Goal: Optimize for non-functional requirements through deep dives
The key to success is following the structured approach while remaining flexible enough to adapt to your interviewer's style and the specific problem domain.
Backend system design problems
🔹 Core Distributed System Problems
These test your knowledge of scalability, availability, and fault tolerance:
- URL Shortener (like TinyURL, Bitly) – hashing, redirection, DB sharding.
- Rate Limiter (API gateway level) – token bucket, sliding window, Redis.
- Notification System – push/pull models, queues, retries, fan-out.
- Logging & Metrics System – ingestion, aggregation, querying, storage.
- Job Scheduler / Cron System – delayed jobs, retries, worker pools.
🔹 Social / Content Platforms
These test how you handle feeds, caching, and high-scale writes:
- News Feed / Timeline (Facebook, Twitter, Instagram) – fan-out on write vs read.
- Chat / Messaging System (WhatsApp, Messenger, Slack) – delivery guarantees, presence, scaling WebSockets.
- Commenting System (nested/threaded) – pagination, consistency, moderation.
- Video Streaming Platform (YouTube, Netflix) – CDN, transcoding, storage.
- File/Photo Sharing Service (Google Drive, Dropbox) – chunking, sync, versioning.
🔹 Search / Query Intensive Systems
- Autocomplete / Search Suggestions – Trie, prefix index, caching.
- Full-text Search Engine (like Elasticsearch) – inverted index, relevance scoring.
- Location-Based Service (Uber, Yelp) – geospatial indexes, proximity search.
🔹 E-commerce & Transactional Systems
- E-commerce Backend (Amazon, Flipkart) – catalog, cart, orders, inventory.
- Payment System (Stripe, PayPal) – transactions, idempotency, double spending.
- Recommendation System – collaborative filtering, caching, precomputation.
- Booking System (Airbnb, TicketMaster) – concurrency, seat locking, fairness.
🔹 Infrastructure / General Backend
- Distributed Cache (like Redis, Memcached) – eviction policies, replication.
- Load Balancer / Reverse Proxy – request routing, health checks.
- Key-Value Store (like DynamoDB, Cassandra) – consistency vs availability.
- Distributed Queue / Pub-Sub System (Kafka, RabbitMQ) – ordering, partitioning.
- Configuration Management Service (like Consul, ZooKeeper) – leader election, consensus.
🔹 “Classic” Big-Tech Style Questions
- Design Instagram / Twitter (feeds, hashtags, search, media storage).
- Design WhatsApp (real-time messaging, delivery guarantees).
- Design Uber / Lyft (geospatial, matching drivers & riders).
- Design YouTube (video storage, recommendations, CDN).
- Design Google Docs (collaborative editing – CRDTs, OT).
- Design Netflix (video streaming, personalization).
- Design Dropbox / Google Drive (file sync & sharing).
- Design Amazon / Flipkart (e-commerce at scale).
- Design a Ride-Hailing Service (Uber/Lyft).